//
//  SPUpcomingHeaderView.m
//  panzer
//
//  Created by 还带大道 on 2018/10/20.
//  Copyright © 2018年 还带大道. All rights reserved.
//

#import "SPUpcomingHeaderView.h"
#import "SPCommon.h"

@interface SPUpcomingHeaderView()
@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UIImageView *bgImageV;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *balance;
@property (weak, nonatomic) IBOutlet UILabel *des;
@property (weak, nonatomic) IBOutlet UIButton *rechargeBtn;

@end

@implementation SPUpcomingHeaderView

+ (instancetype)shareHeaderView
{
    return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].lastObject;
}


- (void)awakeFromNib
{
    [super awakeFromNib];
    self.rechargeBtn.layer.cornerRadius = 3;
    self.rechargeBtn.layer.borderWidth = 1;
    self.rechargeBtn.layer.borderColor = RZ_COLOR(250, 252, 254).CGColor;
    
    _title.text = @"当前余额";
    _balance.text = @"2000元";
    _des.text = @"余额已达预警，为不影响服务，请立即充值。";
    _bgImageV.image = [UIImage imageNamed:@"img-warning-red"];
    
}



- (IBAction)rechargeBtnOnClick:(UIButton *)btn {
    !self.rechargeBtnOnClickBlock?:self.rechargeBtnOnClickBlock();
}


-(void)setDict:(NSDictionary *)dict
{
    _dict = dict;
    _balance.text = dict[@"credit2"];
}

@end
